<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta content="webkit" name="renderer">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
  <meta http-equiv="Pragma" content="no-cache"/>
  <meta http-equiv="Expires" content="0"/>
  <title>${title!'LETO Configuration Center'}</title>

  <link rel="stylesheet" href="${s3('/bootstrap/css/bootstrap.min.css')}">
  <link rel="stylesheet" href="${s3('/layer/3.1.1/theme/default/layer.css')}">
  <link rel="stylesheet" href="${s0('/fonts/font-icons.min.css')}">
  <link rel="stylesheet" href="${s3('/select2/4.0/select2.css')}">
  <link rel="stylesheet" href="${s3('/table/bootstrap-table.css')}">
  <link rel="stylesheet" href="${s3('/jquery-ztree/3.5/css/metro/zTreeStyle.css')}">
  <link rel="stylesheet" href="${s0('/common/common.css')}">
  <!--[if lt IE 9]>
    <script src="${s3('/bootstrap/js/html5shiv.min.js')}"></script>
    <script src="${s3('/bootstrap/js/respond.min.js')}"></script>
  <![endif]-->
</head>
<body>
<#if (hasNavbar!true)>
<nav class="navbar navbar-default navbar-fixed-top">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <span class="navbar-brand">LETO</span>
    </div>
    <#if islogined()>
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li <#if (activeTitle!'')=='project'> class="active"</#if> ><a href="/projects"><i class="fa fa-file-powerpoint-o"></i>项目</a></li>
        <li <#if (activeTitle!'')=='config_file'> class="active"</#if> ><a href="/tree/"><i class="fa fa-file-code-o"></i>文件</a></li>
        <li <#if (activeTitle!'')=='env'> class="active"</#if>><a href="/envs.htm"><i class="fa fa-object-ungroup"></i>环境</a></li>
        <li <#if (activeTitle!'')=='release'> class="active"</#if>><a href="/releases.htm"><i class="fa fa-history"></i>发布</a></li>
        <li <#if (activeTitle!'')=='user'> class="active"</#if>><a href="/users.htm"><i class="fa fa-user"></i>用户</a></li>
        <li <#if (activeTitle!'')=='role'> class="active"</#if>><a href="/roles.htm"><i class="fa fa-umbrella"></i>角色</a></li>
      </ul>

      <form class="navbar-form navbar-left" role="search">
        <div class="form-group">
          <select id="env" class="form-control">
            <#list envs() as v>
            <option value="${v.name}">${v.caption} ${v.name}</option>
            </#list>
          </select>
        </div>
      </form>
      <!--
      <form class="navbar-form navbar-left" role="search">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Search">
        </div>
        <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
      </form>
      -->
      <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus"></i>新建<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="javascript:void(0);" onclick="newProject(function(){window.href.location='/projects.htm'});">项目</a></li>
            <li><a href="javascript:void(0);" onclick="newConfigFile();">文件</a></li>
            <li><a href="javascript:void(0);" onclick="newUser();">用户</a></li>
          </ul>
        </li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">${userName()} <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <!--
            <li><a href="/profile">profile</a></li>
            <li role="separator" class="divider"></li>
            -->
            <li><a href="/user/logout.htm">登出</a></li>
          </ul>
        </li>
      </ul>
    </div><!--/.nav-collapse -->
    </#if>
  </div>
</nav>
<div class="container" style="padding-top: 60px">
</#if>

